#include<stdio.h>

int* twoSum(int* nums, int numsSize, int target, int* returnSize) {
    for (int i = 0; i < numsSize; i++)
    {
        for (int j = i + 1; j < numsSize; j++)
        {
            if (nums[i] + nums[j] == target)
            {
                int* p = (int*)malloc(8);
                if (p == NULL)
                {
                    perror("malloc fail");
                    return NULL;
                }
                p[0] = i;
                p[1] = j;
                *returnSize = 2;
                return p;

            }
        }
    }
    return NULL;

}